import axios from 'axios';
import { apiServer } from "@/utils/config";
// 通用公用方法
// https://zsy-api.tsyxvip.com/api/goods/home?channelNo=ZC210406KgNL17KH&tempType=t2
const upLoadPng = (params) => {
    return axios({
        method: 'post',
        url: apiServer + '/qy/user/authentication',
        headers: {
            'Content-Type': 'multipart/form-data',
            token: localStorage.getItem('logintoken'),
            corpCode: 'QY'
        },
        data: params,
        traditional: true,
        transformRequest: function (data) {
            const formData = new FormData();
            let i = data.formData.entries();
            let j = i.next();
            while (!j.done) {
                formData.set(j.value[0], j.value[1]);
                j = i.next();
            }
            return formData;
        }
    }).then(res => res.data);
}

export default upLoadPng